import request from '@/utils/request'

// 查询用品列表
export function listGoods(query) {
  return request({
    url: '/work/shopgoods/list',
    method: 'get',
    params: query
  })
}

// 查询用品详细
export function getGoods(id) {
  return request({
    url: '/work/shopgoods/' + id,
    method: 'get'
  })
}

// 新增用品
export function addGoods(data) {
  return request({
    url: '/work/shopgoods/saveOrUpdate',
    method: 'post',
    data: data
  })
}

// 修改用品
export function updateGoods(data) {
  return request({
    url: '/system/goods',
    method: 'put',
    data: data
  })
}

// 删除用品
export function delGoods(id) {
  return request({
    url: '/work/shopgoods/delete-by-id' ,
    method: 'get',
    params: {"id":id}
  })
}

export function delGoodsIds(ids) {
  return request({
    url: '/work/shopgoods/delete-by-ids' ,
    method: 'get',
    params: {"ids":ids}
  })
}
